RiCal Fails to handle quoted parameter values.
Reported by Rick DeNatale | July 31st, 2009 @ 05:16 PM
Yes, it's a bug. I'm not handling the double-quoted tzid parameter to DTSTART.
I'm opening a ticket.
On Fri, Jul 31, 2009 at 4:20 PM, Reid
Thompsonreid.thompson@ateb.com wrote:
Am I doing something wrong, or is this a bug.
$ cat testmeeting.ics BEGIN:VCALENDAR METHOD:REQUEST PRODID:Microsoft CDO for Microsoft Exchange VERSION:2.0 BEGIN:VTIMEZONE TZID:(GMT-05.00) Eastern Time (US & Canada) X-MICROSOFT-CDO-TZID:10 BEGIN:STANDARD DTSTART:16010101T020000 TZOFFSETFROM:-0400 TZOFFSETTO:-0500 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=11;BYDAY=1SU END:STANDARD BEGIN:DAYLIGHT DTSTART:16010101T020000 TZOFFSETFROM:-0500 TZOFFSETTO:-0400 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=2SU END:DAYLIGHT END:VTIMEZONE BEGIN:VEVENT [172.16.48.3] DTSTAMP:20090724T143205Z DTSTART;TZID=(GMT-05.00) Eastern Time (US & Canada) SUMMARY:FW: ALL HANDS MEETING UID:040000008200E00074C5B7101A82E00800000000F09226FD490CCA01000000000000000 0100000008A3B4ECE3E789344B8D00FE73D78383B ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Reid Thom pson ORGANIZER;CN=Xxxxxx Xxxxxxxx LOCATION:Reception Area DTEND;TZID=(GMT-05.00) Eastern Time (US & Canada) DESCRIPTION:\N-----Original Appointment-----\NOrganizer: Xxxxxx Xxxxxxxx\NS ent: Fri 7/24/2009 10:32 AM\NRequired: all\; Xxxxxx Xxxxxxxx\; Reid Thomps on\NSubject: ALL HANDS MEETING\NWhen: Tuesday\, August 04\, 2009 12:00 PM- 1:30 PM\NLocation: Reception Area\N\N\NAll\,\NPlease plan on attending our all hands meeting on Tuesday\, August 4 from 12:00 to 1:30.\NLunch will be provided.\N\NAs always\, thank you all for your efforts toward making A teb successful!\N\N\N SEQUENCE:0 PRIORITY:5 CLASS: CREATED:20090724T143205Z LAST-MODIFIED:20090724T162053Z STATUS:CONFIRMED TRANSP:OPAQUE X-MICROSOFT-CDO-BUSYSTATUS:BUSY X-MICROSOFT-CDO-INSTTYPE:0 X-MICROSOFT-CDO-REPLYTIME:20090724T144655Z X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY X-MICROSOFT-CDO-ALLDAYEVENT:FALSE X-MICROSOFT-CDO-IMPORTANCE:1 X-MICROSOFT-CDO-OWNERAPPTID:-1156024359 X-MICROSOFT-CDO-APPT-SEQUENCE:0 X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20090724T143205Z X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20090724T143205Z BEGIN:VALARM ACTION:DISPLAY DESCRIPTION:REMINDER TRIGGER;RELATED=START:-PT00H15M00S END:VALARM END:VEVENT END:VCALENDAR
irb(main):114:0> File.open('testmeeting.ics') do |file| irb(main):115:1* components = RiCal.parse file irb(main):116:1> end => [#<RiCal::Component::Calendar:0xb7972658 @version_property=#<RiCal::PropertyValue::Text:0xb796f55c @params={}, @value="2.0", @timezone_finder=#<RiCal::Component::Calendar:0xb7972658 ...>>, @subcomponents={"VEVENT"=>[#<RiCal::Component::Event:0xb795fbac @status_property=#<RiCal::PropertyValue::Text:0xb7938bc4 @params={}, @value="CONFIRMED", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, @priority_property=#<RiCal::PropertyValue::Integer:0xb794c098 @params={}, @value=5, @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, @sequence_property=#<RiCal::PropertyValue::Integer:0xb794ca34 @params={}, @value=0, @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, @organizer_property=#<RiCal::PropertyValue::CalAddress:0xb79537a8 @params={"CN"=>""Xxxxxx Xxxxxxxx""}, @value="MAILTO:Xxxxxx.Xxxxxxxx@ateb.com", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, @uid_property=#<RiCal::PropertyValue::Text:0xb7955e40 @params={}, @value="040000008200E00074C5B7101A82E00800000000F09226FD490CCA010000000000000000100000008A3B4ECE3E789344B8D00FE73D78383B", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, @subcomponents={"VALARM"=>[#<RiCal::Component::Alarm:0xb79309d8 @imported=true, @action_property=#<RiCal::PropertyValue::Text:0xb7930528 @params={}, @value="DISPLAY", @timezone_finder=#<RiCal::Component::Alarm:0xb79309d8 ...>>, @description_property=#<RiCal::PropertyValue::Text:0xb7930014 @params={}, @value="REMINDER", @timezone_finder=#<RiCal::Component::Alarm:0xb79309d8 ...>>, @trigger_property=#<RiCal::PropertyValue::Duration:0xb792f588 @params={"RELATED"=>"START"}, @minutes=15, @sign=-1, @hours=0, @weeks=0, @days=0, @seconds=0, @value="-PT00H15M00S", @timezone_finder=#<RiCal::Component::Alarm:0xb79309d8 ...>>, @parent=#<RiCal::Component::Event:0xb795fbac ...>>]}, @transp_property=#<RiCal::PropertyValue::Text:0xb79381b0 @params={}, @value="OPAQUE", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, @location_property=#<RiCal::PropertyValue::Text:0xb7952e0c @params={}, @value="Reception Area", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, @dtstamp_property=2009/7/24 14:32:5 0:UTC, @last_modified_property=2009/7/24 16:20:53 0:UTC, @dtend_property=2009/8/4 13:30:0 0:"(GMT-05.00) Eastern Time (US & Canada)", @summary_property=#<RiCal::PropertyValue::Text:0xb7956bc4 @params={}, @value="FW: ALL HANDS MEETING", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, @imported=true, @created_property=2009/7/24 14:32:5 0:UTC, @attendee_property=[#<RiCal::PropertyValue::CalAddress:0xb79548b0 @params={"CN"=>""Reid Thompson"", "PARTSTAT"=>"NEEDS-ACTION", "ROLE"=>"REQ-PARTICIPANT", "RSVP"=>"TRUE"}, @value="MAILTO:Reid.Thompson@ateb.com", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>], @class_property=#<RiCal::PropertyValue::Text:0xb794b4cc @params={}, @value="", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, @x_properties={"X-MICROSOFT-CDO-OWNERAPPTID"=>#<RiCal::PropertyValue::Text:0xb7933764 @params={}, @value="-1156024359", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, "X-MICROSOFT-CDO-ALLDAYEVENT"=>#<RiCal::PropertyValue::Text:0xb79351a4 @params={}, @value="FALSE", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, "X-MICROSOFT-CDO-REPLYTIME"=>#<RiCal::PropertyValue::Text:0xb7936bbc @params={}, @value="20090724T144655Z", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, "X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE"=>#<RiCal::PropertyValue::Text:0xb7931860 @params={}, @value="20090724T143205Z", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, "X-MICROSOFT-CDO-INTENDEDSTATUS"=>#<RiCal::PropertyValue::Text:0xb793607c @params={}, @value="BUSY", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, "X-MICROSOFT-CDO-INSTTYPE"=>#<RiCal::PropertyValue::Text:0xb7937440 @params={}, @value="0", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, "X-MICROSOFT-CDO-IMPORTANCE"=>#<RiCal::PropertyValue::Text:0xb7934380 @params={}, @value="1", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, "X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE"=>#<RiCal::PropertyValue::Text:0xb79320a8 @params={}, @value="20090724T143205Z", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, "X-MICROSOFT-CDO-APPT-SEQUENCE"=>#<RiCal::PropertyValue::Text:0xb79328c8 @params={}, @value="0", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, "X-MICROSOFT-CDO-BUSYSTATUS"=>#<RiCal::PropertyValue::Text:0xb7937e18 @params={}, @value="BUSY", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>}, @description_property=#<RiCal::PropertyValue::Text:0xb794d600 @params={}, @value="\N-----Original Appointment-----\NOrganizer: Xxxxxx Xxxxxxxx\NSent: Fri 7/24/2009 10:32 AM\NRequired: all\; Xxxxxx Xxxxxxxx\; Reid Thompson\NSubject: ALL HANDS MEETING\NWhen: Tuesday\, August 04\, 2009 12:00 PM-1:30 PM\NLocation: Reception Area\N\N\NAll\,\NPlease plan on attending our all hands meeting on Tuesday\, August 4 from 12:00 to 1:30.\NLunch will be provided.\N\NAs always\, thank you all for your efforts toward making Ateb successful!\N\N\N", @timezone_finder=#<RiCal::Component::Event:0xb795fbac ...>>, @dtstart_property=2009/8/4 12:0:0 0:"(GMT-05.00) Eastern Time (US & Canada)", @parent=#<RiCal::Component::Calendar:0xb7972658 ...>>], "VTIMEZONE"=>[#<RiCal::Component::Timezone:0xb796efbc @subcomponents={"STANDARD"=>[#<RiCal::Component::Timezone::StandardPeriod:0xb796ddb0 @tzoffsetfrom_property=#<RiCal::PropertyValue::UtcOffset:0xb796a160 @params={}, @minutes=0, @sign=-1, @hours=4, @seconds=0, @value="-0400", @timezone_finder=#<RiCal::Component::Timezone::StandardPeriod:0xb796ddb0 ...>>, @tzoffsetto_property=#<RiCal::PropertyValue::UtcOffset:0xb7969a08 @params={}, @minutes=0, @sign=-1, @hours=5, @seconds=0, @value="-0500", @timezone_finder=#<RiCal::Component::Timezone::StandardPeriod:0xb796ddb0 ...>>, @imported=true, @rrule_property=[#<RiCal::PropertyValue::RecurrenceRule:0xb79692c4 @params={}, @wkst_day=nil, @by_list={:bymonth=>[11], :byday=>[#<RiCal::PropertyValue::RecurrenceRule::RecurringDay:0xb7967ac8 @ordinal="1", @rrule=#<RiCal::PropertyValue::RecurrenceRule:0xb79692c4 ...>, @index=1, @day="SU", @wday=0, @scope=:monthly, @source="1SU">]}, @wkst="MO", @errors=nil, @interval=1, @by_day_scope=:monthly, @freq="YEARLY", @value="FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=11;BYDAY=1SU", @timezone_finder=#<RiCal::Component::Timezone::StandardPeriod:0xb796ddb0 ...>, @by_list_hash=nil>], @dtstart_property=1601/1/1 2:0:0 0:, @parent=#<RiCal::Component::Timezone:0xb796efbc ...>>], "DAYLIGHT"=>[#<RiCal::Component::Timezone::DaylightPeriod:0xb79671cc @tzoffsetfrom_property=#<RiCal::PropertyValue::UtcOffset:0xb7962244 @params={}, @minutes=0, @sign=-1, @hours=5, @seconds=0, @value="-0500", @timezone_finder=#<RiCal::Component::Timezone::DaylightPeriod:0xb79671cc ...>>, @tzoffsetto_property=#<RiCal::PropertyValue::UtcOffset:0xb7961c54 @params={}, @minutes=0, @sign=-1, @hours=4, @seconds=0, @value="-0400", @timezone_finder=#<RiCal::Component::Timezone::DaylightPeriod:0xb79671cc ...>>, @imported=true, @rrule_property=[#<RiCal::PropertyValue::RecurrenceRule:0xb79616c8 @params={}, @wkst_day=nil, @by_list={:bymonth=>[3], :byday=>[#<RiCal::PropertyValue::RecurrenceRule::RecurringDay:0xb79602c8 @ordinal="2", @rrule=#<RiCal::PropertyValue::RecurrenceRule:0xb79616c8 ...>, @index=2, @day="SU", @wday=0, @scope=:monthly, @source="2SU">]}, @wkst="MO", @errors=nil, @interval=1, @by_day_scope=:monthly, @freq="YEARLY", @value="FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=2SU", @timezone_finder=#<RiCal::Component::Timezone::DaylightPeriod:0xb79671cc ...>, @by_list_hash=nil>], @dtstart_property=1601/1/1 2:0:0 0:, @parent=#<RiCal::Component::Timezone:0xb796efbc ...>>]}, @imported=true, @x_properties={"X-MICROSOFT-CDO-TZID"=>#<RiCal::PropertyValue::Text:0xb796e7b0 @params={}, @value="10", @timezone_finder=#<RiCal::Component::Timezone:0xb796efbc ...>>}, @tzid_property=#<RiCal::PropertyValue::Text:0xb796eb70 @params={}, @value="(GMT-05.00) Eastern Time (US & Canada)", @timezone_finder=#<RiCal::Component::Timezone:0xb796efbc ...>>, @parent=#<RiCal::Component::Calendar:0xb7972658 ...>>]}, @tz_source=nil, @method_property=#<RiCal::PropertyValue::Text:0xb7971a00 @params={}, @value="REQUEST", @timezone_finder=#<RiCal::Component::Calendar:0xb7972658 ...>>, @imported=true, @prodid_property=#<RiCal::PropertyValue::Text:0xb796f9f8 @params={}, @value="Microsoft CDO for Microsoft Exchange", @timezone_finder=#<RiCal::Component::Calendar:0xb7972658 ...>>, @parent=nil>] irb(main):117:0> puts components[0].events[0].dtstart_property ;TZID="(GMT-05.00) Eastern Time (US & Canada)";VALUE=DATE-TIME:20090804T120000 => nil irb(main):118:0> puts components[0].events[0].dtstart RiCal::InvalidTimezoneIdentifier: ""(GMT-05.00) Eastern Time (US & Canada)"" is not the identifier of a VTIMEZONE component of this calendar from /usr/lib/ruby/gems/1.8/gems/ri_cal-0.7.4/lib/ri_cal/component/calendar.rb:157:in
find_timezone' from /usr/lib/ruby/gems/1.8/gems/ri_cal-0.7.4/lib/ri_cal/component.rb:58:in
find_timezone' from /usr/lib/ruby/gems/1.8/gems/ri_cal-0.7.4/lib/ri_cal/property_value/date_time/timezone_support.rb:27:infind_timezone' from /usr/lib/ruby/gems/1.8/gems/ri_cal-0.7.4/lib/ri_cal/property_value/date_time/timezone_support.rb:32:in
timezone' from /usr/lib/ruby/gems/1.8/gems/ri_cal-0.7.4/lib/ri_cal/property_value/date_time/timezone_support.rb:61:inrational_tz_offset' from /usr/lib/ruby/gems/1.8/gems/ri_cal-0.7.4/lib/ri_cal/property_value/date_time.rb:304:in
ruby_value' from /usr/lib/ruby/gems/1.8/gems/ri_cal-0.7.4/lib/ri_cal/properties/event.rb:134:indtstart' from (irb):118
Should I be able to call components[0].events[0].dtstart ??
Thanks, reid
-- Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
Comments and changes to this ticket
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A new icalendar data (RFC 2445) gem for Ruby which supports time zones and enumeration of occurrences